public class Text {
    public static void main(String[] args) {
        double a = 14.99;
        a =(int)(a + 0.5);
        System.out.println(a);
    }
    public final String name = "yyy";
    public final String password="12345";

    public void login(String name,String password) {
        if(!this.name.equals(name)) {
            throw new NameExpection("名字错了");

        }
        if(!this.password.equals(password)) {
            throw new NameExpection("密码错了");
        }

    }
    public static void main1(String[] args) {
        Text text = new Text();
        try {
            text.login("yyy","1245");
        }catch(NameExpection e) {
            e.printStackTrace();
        }catch(PasswordExpection e) {
            e.printStackTrace();
        }finally{
            System.out.println("finally");
        }
        System.out.println("text");
    }
}
